import {Http, Response} from "@angular/http";
import {FaqItem} from "../entity/faqitem";
import {Observable} from "rxjs/Rx";
import {Injectable} from "@angular/core";
/**
 * FaqService
 * Created by robin on 2016/8/5 0005.
 */
@Injectable()
export class FaqService{
    private http:Http;
    
    //注入
    constructor(_http:Http) {
        this.http = _http;
    }

    /**
     * 获取json请求
     * @returns {Observable<Response>}
     */
    getAllFaq():Observable<Response>{
        let url:string = "http://localhost:8888/faq_ssh/faqs.action";
        return this.http.request(url);
    }
}